home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tools / falc_uti / dsp_tool / source / sinus.a56 < prev   
Encoding:
Text File  |  1995-11-25  |  1.4 KB  |  41 lines

  1. ;***************************************
  2. ;*       DSP als Sinusgenerator        *
  3. ;***************************************
  4.     
  5. flag        equ     $10
  6.     
  7.             org     p:0        
  8.             jmp     start
  9.             
  10. include     "F30SSI.INC"      
  11.  
  12. start       movec   #0,sp               ;Stack loeschen
  13.             ori     #$4,omr             ;Sinustabelle ein
  14.             jsr     init                ;SSI-Init aufrufen
  15.             bclr    #0,x:$FFE1
  16.             bclr    #1,x:$FFE1
  17.             bclr    #2,x:$FFE1
  18.             movep   #7,x:$FFE3
  19.  
  20.             move    #0.125,y1           ;Lautstaerke
  21. anfang      move    #256,r0             ;Adresse des Sinus
  22.             do      #255,next           ;Hardware-Schleife
  23.             move    y:(r0)+,x1          ;Sinus holen
  24.             mpy     x1,y1,a             ;leiser machen
  25.             move    a1,x:out_r          ;Ausgabe links
  26.             move    a1,x:out_l          ;Ausgabe rechts
  27. lp          jclr    #1,x:sync,lp        ;Warten bis Ausgabe erfolgt 
  28.             bclr    #1,x:sync           ;Flag loeschen
  29. next        nop                                              ;hier darf kein JMP stehen
  30.             nop
  31.             jclr    #0,x:flag,ein
  32.             bclr    #0,x:flag
  33.             movep   #0,x:$FFE5
  34.             jmp     anfang
  35. ein         bset    #0,x:flag
  36.             movep   #7,x:$FFE5
  37.             jmp     anfang              ;das ganze von vorn
  38.          
  39.             end
  40.  
  41.